<%--
  Created by IntelliJ IDEA.
  User: LENOVO
  Date: 2018/7/13
  Time: 15:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>索赔报表饼状图</title>
    <!-- 引入 echarts.js -->
    <script src="/static/js/plugins/eCharts/echarts-all.js"></script>
</head>
<body>

<!-- 为ECharts准备一个具备大小（宽高）的Dom -->
<div id="main" style="width: 600px;height:400px;"></div>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));

    // 指定图表的配置项和数据
    option = {
        title : {
            text: '理赔报表',
            // subtext: '业务人员',
            subtext: '${groupSaleByTypes}',
            x: 'center'
        },
        tooltip : {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        legend: {
            orient: 'vertical',
            x: 'left',
            // data: ["张三", "李四", "刘一坚", "张祥伟", "陈文龙"]
            data: ${datas}
        },
        series : [
            {
              //  name: '访问来源',
                name: ${goupByTypes},
                type: 'pie',
                radius : '55%',
                center: ['50%', '60%'],
                /*data:[
                    {value:335, name:'张三'},
                    {value:310, name:'李四'},
                    {value:234, name:'刘一坚'},
                    {value:135, name:'张祥伟'},
                    {value:1548, name:'陈文龙'}
                ],*/
                data: ${datas},
                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>

</body>
</html>
